package Lecel_five;

public class Tiger extends Carnivore {
    private String food;
    @Override
    void eat() {
        System.out.println("老虎是"+getKind()+": 年龄为"+super.getAge()+"岁的"+super.getLegs()+"条腿的老虎在吃"+getFood());
    }

    public Tiger(int legs, int age, String kind, String food) {
        super(legs, age, kind);
        this.food = food;
    }

    public String getFood() {
        return food;
    }

    public void setFood(String food) {
        this.food = food;
    }
}
